<extend name="Public:innerbase"/>
<script src="/Public/Common/vote/js/script.js" type="text/javascript"></script>
<block name="content">
	<div class="container-fluid">
		<div style="margin:10px 0;">
			<a href="{:U('Bargain/index')}" class="btn btn-default btn-sm">返回</a>
		</div>			
		<table class="table table-striped wm-table-bordered">
			<thead>
				<tr>
					<th>编号</th>	
					<th class="time">微信名</th>
					<th class="time">总价</th>
					<th>折后价</th>
					<th>票数</th>	
					<th class="norightborder">操作</th>		
				</tr>
			</thead>
			<tbody>
				<volist id="list" name="list">
				<tr>
					<td>{$list.id}</td>	
					<td>{$list.wechat_name}</td>
					<td>{$list.totalprice}</td>
					<td>{$list.lastprice}</td>
					<td>{$list.vote_num}</td>
					<td>{$list.vote_num}</td>
				</tr>
				</volist>
			</tbody>
        </table>
		<div>{$page}</div>
	</div>
	<script type="text/javascript"> 
	var jsonCity = "/Public/Common/vote/js/content/json-array-of-city.js"; 
	var jsonDistrict = "/Public/Common/vote/js/content/json-array-of-district.js"; 
	function getcity(num){
		for (var i = 0; i < jsonCity.length; i++) { 
		if (pre !== "" && pre !== 0 && jsonCity[i].code === pre) { 
			return jsonCity[i].name; 
		} 

	}
	
$(function(){
	$("#delall").click(function(){
		var arrChk=$("input[name='items']:checked");
		var allid='';
		 $(arrChk).each(function(){
			allid = allid + this.value +',';     
		 });
		 if(allid !=''){
			 $.ajax({
					type	:	"get",
					url  	:	"{:U('votex/verifyAll',array('cid'=>$cid))}",
					data	:	"allid=" + allid,
					timeout :	30000,
					dataType	:	"json",
					success:function(dataHtml){
						alert('批量审核成功');
						location.reload();
					},
					error:function(XMLHttpRequest, textStatus, errorThrown){
						alert('操作失效')
					}
				});	 
		 }				
	})
	
	$("#selected").click(function(){
		$('input[name="items"]').attr("checked",this.checked); 	 
	})
})
</script>
</block>
